const path = require('path')

module.exports = {
  mode: "none",
  entry: "./src/index.js",
  output: {
    filename: "bundle.js",
    path: path.join(__dirname, "output/dist"),
    publicPath: 'dist/'
  },
  module: {
    rules: [{
      test: /.css$/,
      use: [
        'style-loader',
        'css-loader'
      ]
    }, {
      test: /.jpg$/,
      use: [
        'file-loader'
      ]
    }, {
      test: /.html$/,
      use:{
        loader: 'html-loader',
        options:{
          attributes:{
            list:[{
              attribute: 'src',
              tag: 'img',
              type: 'src',
            },
            {
              tag: 'a',
              attribute: 'href',
              type: 'src',
            }]
          }
        }
      }
    }]
  }
}